package fr.cephb.operonj.core.bio;

import java.io.Serializable;

public class ChromPosition
	implements Serializable
	{
	private static final long serialVersionUID = 1L;
	private int chromId;
	private int position;
	
	
	public ChromPosition(int chromId, int position)
		{
		super();
		this.chromId = chromId;
		this.position = position;
		}
	
	
	public int getChromId()
		{
		return chromId;
		}
	public int getPosition()
		{
		return position;
		}

	
	
	@Override
	public int hashCode()
		{
		final int prime = 31;
		int result = 1;
		result = prime * result + chromId;
		result = prime * result + position;
		return result;
		}


	@Override
	public boolean equals(Object obj)
		{
		if (this == obj) return true;
		if (obj == null) return false;
		if (!(obj instanceof ChromPosition)) return false;
		ChromPosition other = (ChromPosition) obj;
		if (chromId != other.chromId) return false;
		if (position != other.position) return false;
		return true;
		}
	@Override
	public String toString()
		{
		return "("+getChromId()+")"+getPosition();
		}
	}
